#include<iostream>
#include<vector>
using namespace std;
typedef long long LL;
const int N = 1e6 + 10;
int d[N];
int n, m;
vector<int>g[N];
int f[N];
int main()
{
	cin >> n >> m;
	while (m--) {
		int a, b;
		cin >> a >> b;
		d[a]++;
		g[a].push_back(b);
	}
	for (int i = 1; i <= n; i++) {
		for (auto x : g[i]) {
			f[i] += d[x];
		}
		cout << f[i] << " ";
	}
	return 0;
}